#include "ThreadPool.hpp"
#include"Task.hpp"
#include <ctime>
std::string opers = "+-*/%";
int main()
{
    srand(time(nullptr));
    ThreadPool<Task> *tp = new ThreadPool<Task>(5);
    tp->Start();

    while (true)
    {
        int data1 = rand() % 10 + 1;
        int data2 = rand() % 9;
        char op = opers[rand() % opers.size()];
        Task t(data1,data2,op);
        tp->Push(t);
        std::cout << "创建了一个任务: " << t.ShowTask() << std::endl;
        sleep(1);
    }
    return 0;
}